package Thread.CreateNewThread;
public class CreateNewThread {
    public static void main(String[] args) {
        Thread t=new MyThread();
        t.start();

        Runnable r=new MyRunnable();
        r.run();

        Thread t2=new Thread(()->{
            System.out.println("MyThread2");
        });
        t2.start();
    }
}
class MyThread extends Thread{
    @Override
    public void run() {
        System.out.println("MyThread");
    }
}

class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("MyRunnable");
    }
}
